#include<iostream>
using namespace std;
#include<string>
class Rectangle{
    private:
        int length;
        int width;
        
    public:
        int area;
        Rectangle(){
            length=0;
            width=0;    }
        Rectangle(int length,int width);
        void calArea();
        int getArea(){
        return area;
    }

};
Rectangle::Rectangle(int length,int width){
    this->length=length;
    this->width=width;
}
void Rectangle::calArea(){
    area=length*width;
}


class Plant{
    private:
        string name;
        int age;
        int size;
    public:
        Plant(){
            name='0',age=0,size=0;
        }
        Plant(string  name,int age,int size);
        void grow();
        string getName(){
            return name;
        }
        int getAge(){
            return age;    
        }
        int getSize(){
            return size;
        }
};
Plant::Plant(string  name,int age,int size){
    this->name=name;
    this->age=age;
    this->size=size;
}
void Plant::grow(){
    size++;
    cout<<"I AM GROWING"<<endl;
}
class SmallAnimal{
    private:
        string name;
        int age;
        int size;
    public:
            SmallAnimal(){
                    name='0',age=0,size=0;
            }
            SmallAnimal(string name, int age,int size);
            void eat(Plant);
            string getName(){
                return name;
            }
            int getAge(){
                return age;
            }
            int getSize(){
                return size;
            }
};
SmallAnimal::SmallAnimal(string  name,int age,int size){
    this->name=name;
    this->age=age;
    this->size=size;
}
void SmallAnimal::eat(Plant){
    size++;
}



int main(){
    Rectangle r(3,4);
    r.calArea();
    cout<<r.getArea();
    Plant plant;
    plant.grow();
    plant.grow();
    SmallAnimal smallAnimall;
    smallAnimall.eat(plant);
     cout<<smallAnimall.getName()<<" eat"<<plant.getSize()<<" 's"<<plant.getName()<<endl;
    return 0;
}
